//
//  QrCodeViewController.h
//  midea
//
//  Created by 刘 子威 on 15/4/6.
//  Copyright (c) 2015年 Midea. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

typedef void(^scanSuccessBlock)(NSString *result);

@interface QrCodeViewController : UIViewController<AVCaptureMetadataOutputObjectsDelegate>
{
    int num;
    BOOL upOrdown;
}
@property (nonatomic,strong)AVCaptureDevice *device;
@property (nonatomic,strong)AVCaptureDeviceInput *input;
@property (nonatomic,strong)AVCaptureMetadataOutput *output;
@property (nonatomic,strong)AVCaptureSession *session;
@property (nonatomic,strong)AVCaptureVideoPreviewLayer *preview;
@property (nonatomic,strong)UIImageView *line;
@property (nonatomic,strong)NSTimer *timer;
@property (nonatomic,strong)scanSuccessBlock qrCodeBlock;

- (void)scanQRCode:(scanSuccessBlock)block;

@end
